package org.jeecg.modules.bigdatashow.utils;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

public class GetTimeUtil {

    /**
     * 2021年的头一个月
     * @param month
     * @return
     */
    public static String getYearAndMonth(Integer month){
            DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
            LocalDate localDate = LocalDate.of(2021, month, 1);
            String format = localDate.format(dateTimeFormatter);
            return format;
    }

    public static String getLastDayInYear(){
        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        LocalDate localDate = LocalDate.of(2021, 12, 31);
        String format = localDate.format(dateTimeFormatter);
        return format;
    }

    /*public static String getJanuaryEachDay(Integer day){
        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        LocalDate localDate = LocalDate.of(2021, 1, day);
        String format = localDate.format(dateTimeFormatter);
        return format;
    }*/


}
